﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HFK.DxFluentUI.Utility;
using HFK.DxFluentUITest.Dummy.DataObjects;
using MbUnit.Framework;

namespace HFK.DxFluentUITest.Utility
{
  [TestFixture]
  public class ExpressionHelperTestFixture
  {
    [Test]
    public void TestExpressionDepth()
    {
      Assert.AreEqual(1, ExpressionHelper.ExpressionDepth<SimpleClass, int>(x => x.IntValue));
      Assert.AreEqual(2, ExpressionHelper.ExpressionDepth<SimpleClass, string>(x => x.ShcData.StringValue));
      Assert.AreEqual(4, ExpressionHelper.ExpressionDepth<SimpleClass, string>(x => x.ShcData.DhcProperty.ThcProperty.StringProperty));
    }
  }
}
